home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / sm32a.zip / LIBRARY / AXIS.LI < prev    next >
Text File  |  1994-08-11  |  397b  |  14 lines

  1. axis(xmin_,xmax_,ymin_,ymax_) := block(setcolor(colorno(white)),
  2.     if(ymin>=0, y0:=getmaxy-20, y0:=getmaxy+ymin*getmaxy/(ymax-ymin)),
  3.     if(xmin>=0, x0:=20, x0:=-xmin*getmaxx/(xmax-xmin)),
  4.     line(0,y0,getmaxx,y0),
  5.     moveto(0,y0+10),
  6.     writes(xmin),
  7.     moveto(getmaxx-30,y0+10),
  8.     writes(xmax),
  9.     line(x0,0,x0,getmaxy),
  10.     moveto(x0-20,0),
  11.     writes(ymax),
  12.     moveto(x0-20,getmaxy-40),
  13.     writes(ymin))
  14.